﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using Seesmic.Sdp.Extensibility;
using Seesmic.Sdp.Utils;

using System.Windows.Controls.Primitives;

namespace Seesmic.HelloTipi
{
    public class HelloTipiFavoritesPhotosSideBarAction : SidebarAction
    {
        private HelloTipiPhotos hfi;

        public HelloTipiFavoritesPhotosSideBarAction(HelloTipiAccount account)
        {
            Text = "Images favorites";
            PersistId = string.Format("{0}_{1}", HelloTipiPlugin.PluginId, Text);

            hfi = new HelloTipiPhotos();                                    

            hfi.Content = new FavouritePhotosControlModel(account);
            hfi.Header = String.Concat(Text, " de ", account.ScreenName);
        }       

        public override void Invoke(SidebarActionContext context)
        {            
            context.Space.AddColumn(this, hfi);
        }        
    }

    public class HelloTipiFamilyPhotosSideBarAction : SidebarAction
    {
        private HelloTipiPhotos hfi;

        public HelloTipiFamilyPhotosSideBarAction(HelloTipiAccount account, string family)
        {
            Text = String.Concat("Photos ", family);
            PersistId = string.Format("{0}_{1}", HelloTipiPlugin.PluginId, Text);

            hfi = new HelloTipiPhotos();

            hfi.Content = new FamilyPhotosControlModel(account, family);
            hfi.Header = Text;
        }

        public override void Invoke(SidebarActionContext context)
        {
            context.Space.AddColumn(this, hfi);
        }
    }
}